package com.xuecheng.content.api;

import com.xuecheng.commons.model.vo.CoursePubVo;
import com.xuecheng.commons.model.vo.CourseVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.TeachplanVo;
import com.xuecheng.content.domain.CourseBase;
import com.xuecheng.content.domain.TeachplanWork;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
@Service
@FeignClient(value="xc-content-service")
public interface ContentClient {

    //查询所有
    @GetMapping("/coursePub/findAll")
    ResponseResult<List<CoursePubVo>> findAll();

    //根据id查询课程发布数据
    @GetMapping("/coursePub/{id}")
    ResponseResult<CoursePubVo> findById(@PathVariable("id") Long id);

    //根据id查询课程计划
    @GetMapping("/teachplan/{teachplanId}")
    ResponseResult<TeachplanVo> findPlanById(@PathVariable("teachplanId") Long teachplanId);


    @GetMapping("/{courseBaseId}")
    public ResponseResult<CourseVo> findBycourseId(@PathVariable("courseBaseId") Long courseBaseId);
}
